﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace Fis.Win.Map
{
    public partial class SystemMapControl : DevExpress.XtraEditors.XtraUserControl
    {
        public SystemMapControl()
        {
            InitializeComponent();
        }

        private void lnkRate_Click(object sender, EventArgs e)
        {
            if (Fis.Win.Utils.AppSession.RightsValidata("BD.Rate", "View"))
                UIManager.ShowList<Forms.RateListForm>("RateListViewProvider");
        }

        private void lnkAccount_Click(object sender, EventArgs e)
        {
            if (Fis.Win.Utils.AppSession.RightsValidata("BD.ACCOUNT", "View"))
                UIManager.ShowList<Forms.AccountListForm>("AccountListViewProvider");
        }

        private void lnkAids_Click(object sender, EventArgs e)
        {
            if (Fis.Win.Utils.AppSession.RightsValidata("BD.AIDS", "View"))
                UIManager.ShowList<Forms.AidsListForm>("AidsListViewProvider");
        }

        private void labelControl1_Click(object sender, EventArgs e)
        {
            if (Fis.Win.Utils.AppSession.RightsValidata("BOOK", "Modify"))
                UIManager.ShowEdit<Fis.Win.Forms.BookInfoForm>("BookInfoProvider", Agile.Engine.View.ViewState.Modify);
        }

        private void labelControl2_Click(object sender, EventArgs e)
        {
            if (Fis.Win.Utils.AppSession.RightsValidata("UserListForm", "View"))
                UIManager.ShowList<Fis.Win.Forms.UserListForm>("UserListViewProvider");
        }

        private void labelControl3_Click(object sender, EventArgs e)
        {
            var param = new System.Collections.Hashtable();
            UIManager.ShowEdit<Fis.Win.Forms.UserPwdForm>("UserEditViewProvider", Agile.Engine.View.ViewState.Modify, param);
        }
    }
}
